﻿using System.Windows.Forms;

namespace Exam_Client
{
    public class GenerateSingletonFrm<T> where T : Form, new()
    {
        /// <summary>
        /// 单例窗体泛型类
        /// </summary>
        /// <typeparam name="T"></typeparam>
        private static T frm = null;
        public static T CreateInstrance()
        {
            if (null == frm || frm.IsDisposed)
            {
                frm = new T();
            }
            return frm;
        }
    }
}
